package cn.mw.cmdb.processor;

import cn.mw.cmdb.param.SystemDevTypeEnum;
import com.google.common.base.Strings;

public class TreeOptionFactory {
    public static TreeOptionProccessor build(String type) {
        TreeOptionProccessor proccessor = null;
        if (Strings.isNullOrEmpty(type)) {
            return new DefaultTreeOptionProccessor();
        } else {
            SystemDevTypeEnum systemDevType = SystemDevTypeEnum.valueOf(type);
            switch (systemDevType) {
                case scBankSystemDev:
                    proccessor = new SCBankTreeOptionProcessorCustom();
                    break;
                default:
                    proccessor = new DefaultTreeOptionProccessor();
                    break;
            }
        }
        return proccessor;
    }

}
